{% extends 'myapp/base.html' %}

{% block main_body %}
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            病历模板管理
            <small>智慧医疗系统</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="{% url 'myapp_index' %}"><i class="fa fa-home"></i> 首页</a></li>
            <li class="active">病历模板管理</li>
        </ol>
        </section>

        <!-- Main content -->
        <section class="content container-fluid">

        <div class="row">
            <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <div>
                        <a class="btn btn-success" href="add" >
                            <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>>
                            添加病历模板
                        </a>
                    </div>

                <div class="box-tools">
                    <form action="{% url 'myapp_Templateinfo_search' %}" method="post">
                        {% csrf_token %}
                        <div class="input-group input-group-sm" style="width:150px;">
                          <input type="text" name="templateid" class="form-control pull-right" placeholder="模板号">

                          <div class="input-group-btn">
                            <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                          </div>
                        </div>
                    </form>
                </div>
                </div>


                <head>
                    <style>
                        table {
                            border-collapse: collapse;
                            width: 100%;
                            font-family: Arial, sans-serif;
                            font-size: 14px;
                            text-align: center;
                        }
                        th {
                            background-color: #75a0cc;
                            color: rgb(255, 255, 255);
                            font-size: 18px;
                            text-align: center;
                        }
                        td, th {
                            border: 1px solid #ddd;
                            padding: 6px;
                        }
                        tr:nth-child(even) {
                            background-color: #f5f5f5;
                        }
                    </style>
                </head>
                <body>
                    <table>
                        <thead>
                            <!-- /.box-header -->
                <div class="box-body table-responsive no-padding">
                <table class="table table-hover">
                    <tr>
                        <th>操作</th>
                        <th>模板号</th>
                        <th>主诉</th>
                        <th>现病史</th>
                        <th>既往史</th>
                        <th>婚育史</th>
                        <th>月经史</th>
                        <th>家族史</th>
                        <th>体格检查</th>
                        <th>专科检查</th>
                        <th>辅助检查</th>
                        <th>鉴别诊断</th>
                        <th>初步诊断</th>
                        <th>诊疗计划</th>
                    </tr>
                        </thead>
        
                        <tbody> 
                            {% for obj in Templateinfolist %}
                            <tr>
                                <td>
                                    <a href="edit/{{ obj.templateid }}" class="btn btn-primary btn-xs" >编辑</a>
                                    <a href="delete/{{ obj.templateid }}" class="btn btn-danger btn-xs" >删除</a>
                                    </td>
                                    <td>{{ obj.templateid }}</td>
                                    <td>{{ obj.zhusu }}</td>
                                    <td>{{ obj.xianbingshi }}</td>
                                    <td>{{ obj.jiwangshi }}</td>
                                    <td>{{ obj.hunyushi }}</td>
                                    <td>{{ obj.yuejingshi }}</td>
                                    <td>{{ obj.jiazushi }}</td>
                                    <td>{{ obj.tigejiancha }}</td>
                                    <td>{{ obj.zhuankejiancha }}</td>
                                    <td>{{ obj.fuzhujiancha }}</td>
                                    <td>{{ obj.jianbiezhenduan }}</td>
                                    <td>{{ obj.chubuzhenduan }}</td>
                                    <td>{{ obj.zhenliaojihua }}</td>      
                            </tr>
                            {% endfor %}

                </table>
                </div>
                </div>
            </div>
            <!-- /.box -->
            </div>
        </section>

{% endblock %}